
import { MongooseFactory } from "../kalend";
import { Schema } from "mongoose";

/**商户酒水表 */
const schema = MongooseFactory.Schema({
    //商户
    merchantid: {
        type: Schema.Types.ObjectId,
        ref: "merchant"
    },
    // 酒水
    wineid: {
        type: Schema.Types.ObjectId,
        ref: "winelist"
    },
    //酒水名称
    winename: {
        type: String
    },
    //容量
    capacity: {
        type: String
    },
    //酒精度
    Alcohol: {
        type: String
    },
    //香型
    Aroma: {
        type: String
    },
    // 类型用于排序 1：酒 2：饮料
    type: [{
        type: Number
    }],

    count: {
        type: Number,
        default: 0
    },
    //库存数量
    stock: {
        type: Number,
        default: 0
    },
    //价格
    price: {
        type: Number
    },
    //酒水图片
    img: {
        type: String
    },
    //排序
    order: {
        type: Number,
        default: 9999
    },
    remarks: {
        type: String
    },
    status: {
        type: Number,
        default: 1
    }
});



export const merchant_wineModel = MongooseFactory.Model("merchant_wine", schema);